package com.type;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;

public class Friend extends Person {
	Boolean isOnline;
	String name;

	public Friend() {
		super();
	}
	
	public void setIsOnline(Boolean isOnline) {
		this.isOnline = isOnline;
	}
	
	public Boolean getIsOnline() {
		return isOnline;
	}
	
	public String getName() {
		return name;
	}

	
	@Override
	public void receive(DataInputStream dis) throws IOException, InterruptedException {
		super.receive(dis);
		name = dis.readUTF();
	}

	@Override
	public void send(DataOutputStream dos) throws IOException, InterruptedException {
		super.send(dos);
		dos.writeUTF(name);
	}
}
